const app = getApp()
Page({
  data: {
    id : 0,
    info : []
  },

  onLoad: function (options) {
    var that = this;
    if (options.id) {
      that.setData({
        id: options.id
      })
    }
  },

  onShow: function () {
    var that = this;
    that.getRecruitView();
  },

  getRecruitView: function () {
    var that = this;
    wx.request({
      url: app.globalData.domain + 'Index/GetRecruitView',
      method: "POST",
      data: {
        id: that.data.id
      },
      header: {
        "Content-Type": "application/x-www-form-urlencoded"
      },
      success: (res) => {
        that.setData({
          info: res.data.recruit_info
        });
      },
    })
  },

  other: function() {
    wx.showToast({
      icon: 'none',
      title: '该功能模块正在规划中',
    });
  },

  onShareAppMessage: function() {
    return {
      title: this.data.info.gangweimingcheng,
      desc: '',
      path: '/pages/recruit/recruit?id='+this.data.info.id
    }
  }
})